package com.springboot.personblogsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.springboot.personblogsystem.model.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * Created with IntelliJ IDEA.
 * Description :
 * User: jiume
 * Date: 2025-05-14
 * Time: 19:07
 */
@Mapper
public interface BlogMapper extends BaseMapper<Article> {

    @Select("select count(distinct article_sort) from article where user_id = #{userId} " +
            "and status = 0")
    Long queryArticleSortByUserId(Long userId);
}
